package com.coderitl.springmvc.domain;

import java.util.Date;

public class BookInfo {
    /**
     * mysql> desc bookinfo;
     * +-----------------+--------------+------+-----+---------+-------+
     * | Field           | Type         | Null | Key | Default | Extra |
     * +-----------------+--------------+------+-----+---------+-------+
     * | bookId          | varchar(100) | NO   | PRI | NULL    |       |
     * | bookName        | varchar(100) | NO   |     | NULL    |       |
     * | bookCategory    | varchar(100) | YES  |     | NULL    |       |
     * | bookPrice       | double       | YES  |     | NULL    |       |
     * | bookProductDate | date         | YES  |     | NULL    |       |
     * | shoppingCart    | int(11)      | YES  |     | NULL    |       |
     * +-----------------+--------------+------+-----+---------+-------+
     * 6 rows in set (0.01 sec)
     */
    // 书籍编号
    private String bookId;
    // 书籍名称
    private String bookName;
    // 书籍分类
    private String bookCategory;
    // 书籍价格
    private Double bookPrice;
    // 书籍出版日期
    private Date bookProductDate;
    // 购物车数量
    private Integer shoppingCart;

    public BookInfo() {
    }

    public BookInfo(String bookId, String bookName, String bookCategory, Double bookPrice, Date bookProductDate, Integer shoppingCart) {
        this.bookId = bookId;
        this.bookName = bookName;
        this.bookCategory = bookCategory;
        this.bookPrice = bookPrice;
        this.bookProductDate = bookProductDate;
        this.shoppingCart = shoppingCart;
    }

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getBookCategory() {
        return bookCategory;
    }

    public void setBookCategory(String bookCategory) {
        this.bookCategory = bookCategory;
    }

    public Double getBookPrice() {
        return bookPrice;
    }

    public void setBookPrice(Double bookPrice) {
        this.bookPrice = bookPrice;
    }

    public Date getBookProductDate() {
        return bookProductDate;
    }

    public void setBookProductDate(Date bookProductDate) {
        this.bookProductDate = bookProductDate;
    }

    public Integer getShoppingCart() {
        return shoppingCart;
    }

    public void setShoppingCart(Integer shoppingCart) {
        this.shoppingCart = shoppingCart;
    }

    @Override
    public String toString() {
        return "BookInfo{" +
                "bookId='" + bookId + '\'' +
                ", bookName='" + bookName + '\'' +
                ", bookCategory='" + bookCategory + '\'' +
                ", bookPrice=" + bookPrice +
                ", bookProductDate=" + bookProductDate +
                ", shoppingCart=" + shoppingCart +
                '}';
    }
}
